Closed Bug 606158 Opened 15 years ago Closed 14 years ago

duplicate null check of construct in NewProxyObject

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: [fixed-in-tracemonkey])

Attachments

(1 file)

NewProxyObject(JSContext *cx, JSProxyHandler *handler, const Value &priv, { ... if (construct) { obj->setSlot(JSSLOT_PROXY_CONSTRUCT, construct can not be false here: construct ? ObjectValue(*construct) : UndefinedValue()); }
Attached patch patchSplinter Review
Assignee: general → timeless
Status: NEW → ASSIGNED
Attachment #485021 - Flags: review?
Comment on attachment 485021 [details] [diff] [review] patch ># HG changeset patch ># Parent 036e15ba851ab8f12969be9712f5e62afbbeb454 ># User timeless@mozdev.org >Bug 606158 duplicate null check of construct in NewProxyObject >r=jorendorff > >diff --git a/js/src/jsproxy.cpp b/js/src/jsproxy.cpp >--- a/js/src/jsproxy.cpp >+++ b/js/src/jsproxy.cpp >@@ -1074,8 +1074,7 @@ NewProxyObject(JSContext *cx, JSProxyHan > if (fun) { > obj->setSlot(JSSLOT_PROXY_CALL, call ? ObjectValue(*call) : UndefinedValue()); > if (construct) { >- obj->setSlot(JSSLOT_PROXY_CONSTRUCT, >- construct ? ObjectValue(*construct) : UndefinedValue()); >+ obj->setSlot(JSSLOT_PROXY_CONSTRUCT, ObjectValue(*construct)); > } > } > return obj;
Attachment #485021 - Flags: review? → review?(jorendorff)
grr, stupid browser/bugzilla
Comment on attachment 485021 [details] [diff] [review] patch timeless, r=me and I'm sure gal on that patch. Relieving jorendorff from having to stamp. Thanks for fixing, /be
Attachment #485021 - Flags: review?(jorendorff) → review+
Keywords: checkin-needed
Attachment #485021 - Flags: approval2.0?
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Attachment #485021 - Flags: approval2.0?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: